package vip.youngboy.longpoll.config;

import com.google.common.eventbus.EventBus;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import vip.youngboy.longpoll.service.LongPollService;

@Configuration
public class EventBusConfiguration {

    @Bean
    public EventBus eventBus(LongPollService longPollService){
        EventBus eventBus = new EventBus("scan");
        eventBus.register(longPollService);
        return eventBus;
    }

}
